package com.wlz.creational.abstractfactory.app;

import com.wlz.creational.abstractfactory.buttons.Button;
import com.wlz.creational.abstractfactory.checkboxes.Checkbox;
import com.wlz.creational.abstractfactory.factories.GUIFactory;

/**
 * @author： wlz
 * @Date 2020/10/14 13:45
 * @description： TODO
 * @version: 1.0
 */
public class Application {

    private Button button;

    private Checkbox checkbox;

    public Application(GUIFactory factory) {
        button = factory.createButton();
        checkbox = factory.createCheckbox();
    }

    public void paint() {
        button.paint();
        checkbox.paint();
    }
}
